- 
                Notifications
    
You must be signed in to change notification settings  - Fork 49
 
Change references to "populations" in API to "ancestry groups" #1457
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
          
     Open
      
      
            phildarnowsky-broad
  wants to merge
  9
  commits into
  main
  
    
      
        
          
  
    
      Choose a base branch
      
     
    
      
        
      
      
        
          
          
        
        
          
            
              
              
              
  
           
        
        
          
            
              
              
           
        
       
     
  
        
          
            
          
            
          
        
       
    
      
from
pop-gag
  
      
      
   
  
    
  
  
  
 
  
      
    base: main
Could not load branches
            
              
  
    Branch not found: {{ refName }}
  
            
                
      Loading
              
            Could not load tags
            
            
              Nothing to show
            
              
  
            
                
      Loading
              
            Are you sure you want to change the base?
            Some commits from the old base branch may be removed from the timeline,
            and old review comments may become outdated.
          
          Conversation
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
    
              
                    mattsolo1
  
              
              approved these changes
              
                  
                    Mar 28, 2024 
                  
              
              
            
            
| genes: [String!] | ||
| length: Int | ||
| ancestry_groups: [CopyNumberVariantAncestryGroup!] | ||
| populations: [CopyNumberVariantPopulation!] @deprecated(reason: "Use ancestry_groups") | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This field deprecation story is one of the nice things about GraphQL I have to say.
a3ba6a5    to
    e534c73      
    Compare
  
    Old field names will still work (don't want to break anyone else's gnomAD clients) but are now marked deprecated.
This is prep to changing its "populations" field to "ancestry_groups". Note that, following the GraphQL API schema, "length" and other fields that don't seem like they should be null-able can be null. We should check the actual data, ensure there's no nulls in the fields in question, and assuming not tighten these types up.
…and associated fields
…y and associated fields
e534c73    to
    12869f6      
    Compare
  
    Trying to do this systematically with the unstructured queries we have is proving to be error-prone and risky.
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
      
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Old fields are still supported but are now marked as deprecated.
Frontend queries are also updated in the interest of eating our own dogfood, though due to the difficulty entailed in finding out systematically which queries use a given field, it's possible there are still some references toThe frontend has been left alone for now for reasons described in a comment below.populationsin some. Also, in the interest of keeping this PR down to a reasonable size and timeframe, I mainly did not address changing variable names in non-user-facing code, just where it was necessary to make e.g. deserialization of GraphQL responses come out correctly.